package org.example.DesignPatterns.Flyweight;

/**
 * @description:
 * @author: farprt
 * @create: 2022-09-18 14:45
 **/
public class River implements Drawable{

    //类内部即将共享的”元“数据
    private String image;

    public River(){
        this.image="River";
        System.out.println("从磁盘加载["+image+"]图片，耗时半秒......");
    }

    @Override
    public void draw(int x, int y) {
        System.out.println("在位置["+x+":"+y+"]绘制图片:["+image+"]");
    }


}